package com.vertx.core.common;

/**
 * @Author: fiercewind
 * @Description:
 * @Date: 21:42 2018/4/19
 */
public enum StatusCodeMsg {
    C200(200,"成功"),
    C201(201,"操作正常但没有任何改变"),
    C202(202,"部分成功,部分失败"),

    C300(300,"用户未登陆"),
    C301(301,"被封禁的用户"),
    C302(302,"用户未注册"),
    C303(303,"用户已注册"),
    C304(304,"用户名或密码错误"),
    C305(305,"手机未注册"),
    C306(306,"手机已注册"),
    C307(307,"验证码发送失败"),
    C308(308,"验证码失效"),
    C309(309,"验证码错误"),
    C310(310,"短信平台异常"),
    C313(313,"未授权或者权限过期"),
    C314(314,"非法操作或没有权限"),
    C315(315,"IP被限制"),

    C404(404,"无效的URL请求,或者指定URL不存在"),
    C406(406,"对象只能读取"),
    C407(407,"对象不存在"),
    C408(408,"请求超时"),

    C412(412,"缺少参数或者参数空值"),
    C413(413,"参数值不符合规定范围"),
    C414(414,"参数不合法"),
    C416(416,"频繁操作"),
    C431(431,"HTTP重复请求"),
    C500(500,"服务器内部错误"),
    //好友关系状态表
    C700(700,"双方不是好友"),
    C701(701,"添加好友失败"),
    C702(702,"双方已经是好友"),
    // 群黑名单关系状态
    C713(713,"该用户已在本群黑名单中"),
    C714(714,"该用户不在本群黑名单中"),
    C715(715,"不能将自己加入黑名单中"),
    // 会员关系状态表
    C770(770,"双方不是会员"),
    C771(771,"添加会员失败"),
    C772(772,"双方已经是会员"),
    C773(773,"系统会员,不能删除"),
    // 商家关注表
    C781(781,"关注商家失败"),
    C782(782,"已经关注了该商家"),
    C783(783,"尚未关注该商家"),
    C784(784,"商家不存在"),
    C785(785,"商家已经认证过"),
    C786(786,"商家客服超过最大人数"),
    C787(787,"用户正在申请企业认证"),
    // 推荐人状态表
    C790(790,"距离上次修改推荐人的时间太短"),
    C791(791,"添加推荐人失败"),
    C792(792,"修改推荐人失败"),
    C793(793,"双方已经是推荐人"),
    C794(794,"推荐人或者用户不存在"),
    C795(795,"推荐人已经设置了推荐人"),
    C796(796,"推荐人不能是自己"),
    // 群相关
    C801(801,"群人数达到上限"),
    C802(802,"没有权限"),
    C803(803,"群不存在"),
    C804(804,"用户不在群"),
    C805(805,"群类型不匹配"),
    C806(806,"创建群数量达到限制"),
    C807(807,"群成员状态错误"),
    C808(808,"申请成功"),
    C809(809,"已经在群内"),
    C810(810,"邀请成功"),
    // 服务器错误
    C1000(1000,"[服务器]运行时异常"),
    C1001(1001,"[服务器]空值异常"),
    C1002(1002,"[服务器]数据类型转换异常"),
    C1003(1003,"[服务器]IO异常"),
    C1004(1004,"[服务器]未知方法异常"),
    C1005(1005,"[服务器]数组越界异常"),
    C1006(1006,"[服务器]网络异常"),

    C1400(1400,"[服务器]Bad Request"),
    C1401(1401,"[服务器]NotAuthorization"),
    C1405(1405,"[服务器]Method Not Allowed 检查请求方式是否有错"),
    C1406(1406,"[服务器]Not Acceptable"),

    C1500(1500,"[服务器]Internal Server Error"),
    C1505(1505,"[服务器]缓存异常")
            ;
    // 状态码
    private int code;
    private String msg;

    StatusCodeMsg(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    /**
     * 得到状态码
     *
     * @return
     */
    public int getCode() {
        return code;
    }

    /**
     * 获得状态码相应的信息
     *
     * @return
     */
    public String getMsg() {
        return msg;
    }
}
